Business Rule Types
Finance Rule
Finance Business Rules are used to generate multi-Dimensional calculations. These Business Rules are written as Shared Business Rules and applied to a Cube or Member Formulas. Eight of these can be assigned to run at the Cube level during consolidations.
Example APIs
api.FunctionType
The expression used when special logic needs to be run and a certain process needs to be isolated.
Finance Function Type
Calculate
Additional logic during calculation of Entity, Consolidation Scenario and Time. This sets the value of one or more values (left side of Formula) equal to another (right side). It then executes a calculation for a specifically qualified Point of View. This is the most common function used.
Translate
Additional logic that uses custom translation.
FXRate
Custom logic used to determine Foreign Exchange rates for any intersection.
Consolidate Share
Additional logic used during the custom calculation of the Share Member.
Consolidate Elimination
Additional logic used during the custom calculation of the Elimination Member.
Calculation Drill Down Member Formula
Provides custom drill down results.
Conditional Input Rule
Conditional Input Rules make data cells read-only. While the settings for this can be done directly on the Cube, using a Conditional Input Business Rule offers more flexibility and still allows the use of the Cube settings. This rule can return the following: ConditionalInputResultType.Default, ConditionalInputResultType.NoInput, ConditionalInputResultType.NoInputAllowCellDetail, and ConditionalInputResultType.NoCellDetailAllowInput.
The following Business Rule example will make all cells for the Account 6000 read-only. This should be added to a Business Rule attached to a Cube.
Case Is = FinanceFunctionType.ConditionalInput If api.Pov.Account.Name.XFEqualsIgnoreCase("6000") Then Return ConditionalInputResultType.NoInput End If Return ConditionalInputResultType.Default
Confirmation Rule
Special logic that runs with Confirmation Rules.
Data Cell
Named GetDataCell calculations that can be reused such as a Better/Worse calculation in Cube Views.
Dynamic Calc Account
Special logic to use in Dynamic Calc members.
Member List and Member List Headers
A custom list of members for use in Cube Views and other areas. See Commonly Used Member Filter Functions in Cubes for more details on using custom lists in a Cube View.
Finance Business Rule Example
Parser Rule
Parser Business Rules are used to evaluate and/or modify field values being processed by the Stage Parser Engine as it reads source data. These Business Rules are written as Shared Business Rules or Logical Expressions and applied to a Data Source Dimension.
Example API
args.Line
This will return the entire record being processed from the Data Source.
args.Value
This will return the Dimension the Business Rule is assigned to in the Data Source.
Common Usage
-
Custom parsing logic
-
Field value concatenation
-
Field value bypassing
-
Evaluate field other than current field being parsed
Parser Business Rule Example
Connector Rule
Connector Business Rules are used to communicate with, collect data from, and drill back to external systems. These Business Rules are written as Shared Business Rules and applied to a Data Source.
See Connectors in Collecting Data for more information on using Connectors.
Example API
args.ActionType
This will return one of the four available Connector action types.
ConnectorActionTypes.GetFieldList
This will run the SQL query to return the available field list to the Data Source for Dimension assignment.
ConnectorActionTypes.GetData
This will run the SQL query to retrieve the source data and return it to the Stage based on the Data Source Dimension assignment.
ConnectorActionTypes.GetDrillBackTypes
This will return a list of the specified drill back types. (e.g., File or Data Grid)
ConnectorActionTypes.GetDrillBack
This will run the required SQL query against the source system and will provide greater detail than what was originally imported.
Connector Business Rule Example
Namespace OneStream.BusinessRule.Connector.RevenueMgmtHouston
Conditional Rule
Conditional Rules (mapping) are used to conditionally evaluate mapping criteria during the data transformation process. These Business Rules are written as Shared Business Rules or Logical Expressions and applied to a Transformation Rule definition.
They are only applicable to Transformation Rules with the type of Composite, Range, List, or Mask either as a Business Rule or Complex Expression.
Example API’s
args.GetSource
This will return the source value for the specified Dimension.
args.GetTarget
This will return the mapped or transformed value for the specified Dimension.
args.OutputValue
This will return the originally mapped target value from the Transformation Rules.
Conditional Business Rule Example 1
Conditional Rule for Dimension Member mapping based on source values. Note that if the Business Rule does not call args.OutputValue, the target field can be empty and will not be considered.
Conditional Business Rule Example 2
Conditional Rule for Dimension Member mapping based on target values.
Derivative Rule
Derivative Rules (derive data prior to mapping) are used to evaluate and/or calculate values during the data derivation process. These Business Rules are written as Shared Business Rules or Logical Expressions and applied to a Derivative Rule definition.
They are only applicable to Transformation Rules with the type of Derivative either as a Business Rule or Complex Expression.
Common Usage
-
Calculate mathematical expressions
-
Lookup value from transformation cache for use in calculations
-
Lookup value from Cube for use in calculations
-
Source system check rule logic (validation rules on source data)
Derivative Business Rule Example
Cube View Extender
Cube View Extender Rules are used to apply advanced Cube View formatting to any Cube View while in Report view.
NOTE: These rules do not apply to how a Cube View looks like in the Data Explorer Grid view.
The Extender Rule is used in conjunction with the Execute Cube View Extender Business Rule setting on the Cube View. See Cube View Extender: Advanced Cube View Formatting in Implementing Security for examples on how to use this rule. See the API Overview Guide.
Common Usage
The following are key uses for Cube View Extender Business Rules in formatting Reports.
-
Alter Headers and Footers
-
Display different logos on select reports based on conditional logic or security and manage their placement and size
-
Customize the page number in the header or footer
Page numbers can be on the top or bottom row of a report and the horizontal position can be specified for rows. This only applies to the top or bottom rows. -
Format individual header and footer fields
-
Control the Left, Right, Center Subtitle widths
-
Control the font size of Title and Subtitles
-
Customize the date display
-
-
Alter Column and Row Headers
-
Customize bottom text alignment
-
Control Word Wrap
-
-
Apply Conditional Formatting to Data Cells
-
Format cells based on their contents
-
Change the text color of a value in order to effectively hide the result
-
Dashboard DataSet
DashboardDataSet Rules are used to create programmatic query results. This rule type combines multiple types of data into a single result set using the full syntax capability of VB.Net. These Business Rules are written as Shared Business Rules and applied to Dashboard Data Adapters or Dashboard Parameters.
Common Usage
-
Combine different types of data for a report
-
Build programmatic data queries (e.g., analytic plus sql)
-
Conditionally build data query reports
-
Conditionally build data query for Parameters
-
Create geographical data to display via a Map Parameter Component in a Dashboard
-
Create a data series to display via a Chart (Advanced) Parameter Component in a Dashboard
Dashboard Extender
DashboardExtender Rules are used to perform a variety of tasks associated with custom Dashboards and MarketPlace Solutions. These Business Rules can be thought of as multi-purpose rules and make up the majority of the code written in a MarketPlace Solution. In addition, they are written as Shared Business Rules and applied to Application Dashboard Parameter Components (Buttons, Combo Boxes, etc.).
Common Usage
-
Execute task when the user clicks a button
-
Perform a task and show a message to the user
-
Perform a custom calculation
-
Upload a file from the end user’s machine
-
Automate a Workflow
-
Build a custom Workflow
-
Create custom data tables
-
Include Page State to store parameters and values about a specific Dashboard page instance
Dashboard XFBRString
BRString(brRuleName, funcNameWithinBRRule, optionalName1 = var1, optionalName2 = var2)
Enter the Business Rule as a Parameter using |!BRString!|
The return value from the Business Rule will be used in the Dashboard Component.
NOTE: This Business Rule can be applied to any Dashboard or Cube View property where a Parameter is used.
Extensibility Rule
Extensibility Rules have these two types: Extender and Event Handlers. Extender Rules are the most generalized type of Business Rule in the OneStream platform. Use these to write a simple utility function or a specific helper function called as part of a Data Management Job. Event Handlers are exclusively called before or after a certain operation occurs within the system.
IMPORTANT: Full Administrator rights are required to edit Extensibility Rules.
Extensibility Business Rule Example
Event Handler that sends an email notification after a ProcessCube event.
Extender
This can be used to automate custom tasks like running external scripts, backups and report publishing.
WCF Event Handler
This allows direct interaction with the Microsoft Windows Communication Foundation which means it listens to communication between the client and the web server. The rule will intercept the communication, analyze it, and if certain criteria is met, it will run its logic. This is quite flexible and has a variety of uses such as creating, reading, deleting, and updating different types of objects in the system for users in a group or Transformation Rule changes. For example, a rule can be created to e-mail an auditor about every metadata change as it happens.
Available operations
Transformation Event Handler
This can be run at various points from Import through Load. Available operations.
-
StartParseAndTransForm
-
InitializeTransFormer
-
ParseSourceData
-
LoadDataCacheFromDB
-
ProcessDerivativeRules
-
ProcessTransformationRules
-
DeleteData
-
DeleteRuleHistory
-
WriteTransFormedData
-
SummarizeTransFormedData
-
CreateRuleHistory
-
EndParseAndTransForm
-
FinalizeParseAndTransForm
-
StartRetransForm
-
EndRetransForm
-
FinalizeRetransForm
-
StartClearData
-
EndClearData
-
FinalizeClearData
-
StartValidateTransForm
-
ValidateDimension
-
EndValidateTransForm
-
FinalizeValidateTransForm
-
StartValidateIntersect
-
EndValidateIntersect
-
FinalizeValidateIntersect
-
LoadIntersect
-
StartLoadIntersect
-
EndLoadIntersect
-
FinalizeLoadIntersect
Journals Event Handler
This can be run before, during, or after a Journal operation such as Submission, Approval, or Post. Available operations:
-
SubmitJournal
-
ApproveJournal
-
RejectJournal
-
PostJournal
-
UnpostJournal
-
StartUpdateJournalWorkflow
-
EndUpdateJournalWorkflow
-
FinalizeUpdateJournalWorkflow
Save Data Event Handler
This is run in order to track all save events in an application.
Forms Event Handler
This can be run before, during, or after an operation such as Form Save. Available operations:
-
SaveForm
-
CompleteForm
-
RevertForm
-
StartUpdateFormWorkflow
-
EndUpdateFormWorkflow
-
FinalizeUpdateFormWorkflow
Data Quality Event Handler
This can be run before, during, or after data quality events like Confirmation and Certification. Available operations:
-
StartProcessCube
-
Calculate
-
Translate
-
Consolidate
-
EndProcessCube
-
FinalizeProcessCube
-
PrepareICMatch
-
StartICMatch
-
PrepareICMatchData
-
EndICMatch
-
StartConfirm
-
EndConfirm
-
FinalizeConfirm
-
SaveQuestionResponse
-
StartSetQuestionairreState
-
SaveQuestionairreState
-
EndSetQuestionairreState
-
StartSetCertifyState
-
SaveCertifyState
-
EndSetCertifyState
-
FinalizeSetCertifyState
Data Management Event Handler
This can be run before or after a Data Management Sequence or Step runs. Available operations:
-
StartSequence
-
ExecuteStep
-
EndSequence
Workflow Event Handler
This can be run before or after a Workflow execution step. Available operations:
-
UpdateWorkflowStatus
WorkflowLock
WorkflowUnlock